<template>
  <el-dialog title="预览" :visible.sync="visible" width="60%">
    <el-scrollbar v-html="fileContent" style="height: 600px;"></el-scrollbar>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      visible: false,
      fileContent: ''
    };
  },
  methods: {
    open(content) {
      this.fileContent = content;
      this.visible = true;
    }
  }
};
</script>
